package com.loto.insurance.oem.web.db.mapper;

import java.util.List;
import java.util.Map;

import com.loto.insurance.oem.web.entity.PolicyInfoAir;

public interface PolicyInfoAirMapper {

  long insertPolicyInfo(PolicyInfoAir policyInfo);

  int updatePolicyFeeStatusByOrderId(Map<String, Object> params);

  int updatePolicyFeeStatusById(Map<String, Object> params);

  int updatePolicyStatusByOrderId(Map<String, Object> params);

  int updatePolicyStatusById(Map<String, Object> params);

  List<PolicyInfoAir> findPolicyInfoById(long orderId);
  
  // 投保成功，根据对外订单号和订单ID更新支付成功或投保失败的保单信息
  int updatePolicyByOutOrderNoOrderId(Map<String, Object> params);

  // 根据对外订单号和订单ID更新保单状态
  int updatePolicyStatusByOutOrderNoOrderId(Map<String, Object> params);

  // 根据对外订单号和订单ID获取保单ID
  PolicyInfoAir findPolicyInfoByOutOrderNoOrderId(
	  Map<String, Object> params);
  
  // 根据订单ID和保单订单获取能退款的保单对外订单号
  PolicyInfoAir findCanRefundPolicyInfoOrderId(
	  Map<String, Object> params);
}
